import Web3 from 'web3'

const toEther = (value) => {
  return Web3.utils.fromWei(value, 'ether')
}

const ganacheAddress = '0xFBef33e09081236cC4A1f8D2C175E9fEf6Aa2DFa'
const ganachePrivateKey =
  '0x700c472fef576757270df5068e0ec7152e7307000cfe3fbf5d15be43bde55230'

const providerURL = 'http://127.0.0.1:8545'
const address = ganacheAddress

const web3 = new Web3(new Web3.providers.HttpProvider(providerURL))

web3.eth.getBalance(address).then((value) => {
  let balance = toEther(value)
  console.log('====>balance:', balance)
})
